package com.hex.ds.hdrs.period.job.dao;


import com.hex.bigdata.hbda.base.BaseDao;
import com.hex.bigdata.hbda.base.Page;
import com.hex.ds.hdrs.period.job.po.PeriodJobDef;
import com.hex.ds.hdrs.period.job.dto.PeriodJobExportDto;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Repository
public class PeriodJobDefDao extends BaseDao {

    /*
     * @Method: queryListByPage <br>
     * @Param: [periodJobDef, page] <br>
     * @Return: java.util.List<com.hex.ds.hdrs.period.job.po.PeriodJobDef> <br>
     * @Description：分页查询<br>
     * @Author： wz.li<br>
     * @Date： 2023/5/5 15:02 <br>
     * @Version： V2.0.2<br>
     */
    public List<PeriodJobDef> queryListByPage(PeriodJobDef periodJobDef, Page page) {
        return this.selectPage(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.queryListByPage", page, periodJobDef);
    }

    public List<PeriodJobDef> qryJobDefList(Map map) {
        return this.selectList(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDef", map);
    }
    public List<PeriodJobDef> qryJobDefDependList(Map map,Page page) {
        return this.selectPage(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDefDepend",page, map);
    }
    public List<PeriodJobDef> qryJobDefList() {
        return this.selectList(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDef");
    }

    public List<PeriodJobDef> qryJobDefPage(Map map, Page page) {
        return this.selectPage(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDefPage", page, map);
    }

    public List<PeriodJobDef> qryJobDefPageNotCurrApp(Map map, Page page) {
        return this.selectPage(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDefPageNotCurrApp", page, map);
    }
    public int insert(PeriodJobDef periodJobDef) {
        return this.insert("com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.insert", periodJobDef);
    }

    public PeriodJobDef qryJobDef(Map map) {
        return this.selectOne(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDef", map);
    }

    public int update(PeriodJobDef periodJobDef) {
        return this.update("com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.update", periodJobDef);
    }

    public int removeById(String pkId) {
        return this.delete("com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.removeById", pkId);
    }

    public List<PeriodJobDef> getJobDefList(Map map) {
        return this.selectList(PeriodJobDef.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.getJobDefList", map);
    }

    public Map getCountNotCreate(Map<String, String> map) {
        return this.selectOne(Map.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.getCountNotCreate", map);
    }

    public List<PeriodJobExportDto> qryJobDefAndTaskDefList(PeriodJobDef periodJobDef){
        return this.selectList(PeriodJobExportDto.class, "com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.qryJobDefAndTaskDefList", periodJobDef);
    }

    public List<PeriodJobDef> findPeriodJobDefListByBizDate(Map map) {
        return this.selectList(PeriodJobDef.class,"com.hex.ds.hdrs.period.job.dao.PeriodJobDefDao.findPeriodJobDefListByBizDate",map);
    }
}